package com.qiantu.phone.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.hjq.widget.view.SwitchButton;
import com.qiantu.api.entity.SceneManagerBean;
import com.qiantu.phone.R;

public class PrivateSceneMemberAdapter extends BaseQuickAdapter<SceneManagerBean, BaseViewHolder> {

    public PrivateSceneMemberAdapter() {
        super(R.layout.private_scene_member_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, SceneManagerBean item) {
        helper.setText(R.id.nickname, item.getUserData().getName());
        helper.setText(R.id.remarks, item.getUserData().getNickName());
        SwitchButton btnSwitch = helper.getView(R.id.btn_switch);
        btnSwitch.setChecked(!item.isIsDisable());
    }
}
